import request from '@/utils/request'

// 查询咨询个人档案列表
export function listArchives(query) {
  return request({
    url: '/consult/personal/archives/list',
    method: 'get',
    params: query
  })
}

// 获取个案号
export function getArchivesNo() {
  return request({
    url: '/consult/personal/archives/genNo',
    method: 'get'
  })
}

// 查询登录名信息
export function selectUserName(username) {
  return request({
    url: '/consult/personal/archives/selectUserName',
    method: 'get',
	params: {selectUserName: username}
  })
}

// 查询咨询个人档案详细
export function getArchives(personalArchivesId) {
  return request({
    url: '/consult/personal/archives/' + personalArchivesId,
    method: 'get'
  })
}

// 新增咨询个人档案
export function addArchives(data) {
  return request({
    url: '/consult/personal/archives',
    method: 'post',
    data: data
  })
}

// 修改咨询个人档案
export function updateArchives(data) {
  return request({
    url: '/consult/personal/archives',
    method: 'put',
    data: data
  })
}

// 删除咨询个人档案
export function delArchives(personalArchivesIds) {
  return request({
    url: '/consult/personal/archives/' + personalArchivesIds,
    method: 'delete'
  })
}
